<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test08</title>
</head>
<body>
    <script type="text/javascript">
        var num1 = 10;
        var num2 = 20;
        console.log("最大值为：" + (num1 > num2 ?"num1："+ num1 :"num2："+  num2));
    </script>
</body>
</html>